package day10;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;


public class CollectionTest {
	
	public static void main(String[] args) {
		Map<String, List<String>> mapper = new HashMap<String, List<String>>(); 
		List<String> list = mapper.get("A");
		if(list==null) {
			list = new ArrayList<String>();
			mapper.put("A", list);
		}
		
		list.add("asdf");
//		mapper.toString();
		test(mapper);
	}
	
	static void test(Map<String, List<String>> mapper) {
		for (Iterator<String> iterator = mapper.keySet().iterator(); iterator.hasNext();) {
			String key =  iterator.next();
			List<String> list = mapper.get(key);
			System.out.println(key + " " + list.toString());
		}
	}
}
